<?php if (!defined('THINK_PATH')) exit();?><link rel="stylesheet" href="/Public/bootstrap/css/bootstrap.min.css">
	<link href="/Public/bootstrap/css/bootstrap.datepicker/bootstrap-datepicker3.min.css" rel="stylesheet" />
	<script src="/Public/bootstrap/js/jquery.min.js"></script>
	<script src="/Public/bootstrap/js/bootstrap/bootstrap.min.js"></script>
	 <script src="/Public/bootstrap/js/bootstrap.datepicker/js/bootstrap-datepicker.min.js"></script>
    <script src="/Public/bootstrap/js/bootstrap.datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<div class='content-fuild' style="margin:20px">
<a class="btn btn-primary"  href="<?php echo U('Depart/Abnormal/index');?>">返回</a> 
<a class="btn btn-primary"  href="<?php echo U('Depart/Abnormal/items',array('id'=>$header[0]["aid"]));?>">不合格内容</a> 

<table class="table   table-bordered">
<input class="input-control">
<caption style="text-align: center">NCR报告</caption>
	<thead style="text-align: center">
		<tr>
			<th>NCR编号</th>
			<th><?php echo ($header[0]['sn']); ?></th>
			<th>签发日期</th>
			<th><?php echo (date('Y.m.d',$header[0]['sign'])); ?></th>
		</tr>
		<tr>
			<th>责任部门</th>
			<th><?php echo ($header[0]['depart']); ?></th>
			<th>签发人</th>
			<th><?php echo ($header[0]['signer']); ?></th>
		</tr>
	</thead>
	<tbody>
		<tr><td colspan='4'>不合格内容</td></tr>
		<tr>
			<td colspan='4'>
				<?php if(is_array($items)): foreach($items as $key=>$v): ?><h4><?php echo ++$i;?>.<?php echo ($v["abtype"]); ?><a class="btn btn-default"  href="<?php echo U('Depart/Abnormal/reason',array('adid'=>$v['adid']));?>">原因分析及处理</a></h4>
				 <?php echo ($v["content"]); ?><br /><?php endforeach; endif; ?>
			</td>
		</tr>

		<tr><td colspan='4'>原因分析</td></tr>
			<td colspan='4'>
				<?php if(is_array($items)): foreach($items as $key=>$v): ?><h4><?php echo ++$j;?>.<?php echo ($v["reasontype"]); ?><a class="btn btn-default"  href="<?php echo U('Depart/Abnormal/method',array('adid'=>$v['adid']));?>">处理措施</a></h4>
				 <?php echo ($v["reason"]); ?><br /><?php endforeach; endif; ?>
			</td>
		<tr><td colspan='4'>处理措施</td></tr>
			<td colspan='4'>
				<?php if(is_array($items)): foreach($items as $key=>$v): echo ++$k;?>.<?php echo ($v["method"]); ?><br /><?php endforeach; endif; ?>
			</td>
	</tbody>
</table>
</div>